<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://localhost" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost" elementFormDefault="qualified">
  <xs:element name="report">
    <xs:annotation>
      <xs:documentation xml:lang="en">Medical Devices Invoices Report</xs:documentation>
      <xs:documentation xml:lang="ro">Raportare de dispozitive medicale</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="medDevices">
          <xs:annotation>
            <xs:documentation xml:lang="en">Medical Devices</xs:documentation>
            <xs:documentation xml:lang="ro">Dispozitive medicale acordate raportate</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="medDevice" type="medDevItemType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="en">Medical Device</xs:documentation>
                  <xs:documentation xml:lang="ro">Dispozitiv medical acordat</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="medDeviceReparations">
          <xs:annotation>
            <xs:documentation xml:lang="en">Medical Device Reparations</xs:documentation>
            <xs:documentation xml:lang="ro">Dispozitive medicale reparate raportate</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="medDeviceReparation" type="medDevItemType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="en">Medical Device Reparation</xs:documentation>
                  <xs:documentation xml:lang="ro">Dispozitiv medical reparat</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <!-- header attributes -->
      <xs:attribute name="AppKey" use="optional">
        <xs:annotation>
					<xs:documentation xml:lang="en">3rd partry software provider product key</xs:documentation>
          <xs:documentation xml:lang="ro">Cheia de identificare a aplicaţiei de raportare (producator de software 3rd partry)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="AppID" use="required">
        <xs:annotation>
					<xs:documentation xml:lang="en">Unique identifier of report</xs:documentation>
					<xs:documentation xml:lang="ro">Identificator unic al raportării</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="medicalUnit" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Medical Unit Name</xs:documentation>
          <xs:documentation xml:lang="ro">Nume Unitate Medicala</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="100" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="fiscalCode" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Fiscal Code</xs:documentation>
          <xs:documentation xml:lang="ro">Cod Fiscal</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="contractNo" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Contract Number</xs:documentation>
          <xs:documentation xml:lang="ro">Numar Contract</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="insuranceHouse" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">CJAS Code</xs:documentation>
          <xs:documentation xml:lang="ro">Cod CJAS</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="reportingDate" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Reporting Date</xs:documentation>
          <xs:documentation xml:lang="ro">Data Raportarii</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="startFrom" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">Start Reporting Date</xs:documentation>
          <xs:documentation xml:lang="ro">Data inceputului de raportare</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="endTo" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="en">End Reporting Date</xs:documentation>
          <xs:documentation xml:lang="ro">Data sfarsitului de raportare</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="invoiceNo" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice number</xs:documentation>
          <xs:documentation xml:lang="ro">Numar factura</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="invoiceDate" type="xs:date" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice date</xs:documentation>
          <xs:documentation xml:lang="ro">Data factura</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="invoiceAmount" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice amount</xs:documentation>
          <xs:documentation xml:lang="ro">Valoare factura</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="medDevItemType">
    <xs:annotation>
      <xs:documentation xml:lang="ro">Tipul de date folosit pentru dispozitivele medicale raportate</xs:documentation>
    </xs:annotation>
    <xs:attribute name="AppID" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en">Order Number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar de ordine</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="personType" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en">Person type</xs:documentation>
        <xs:documentation xml:lang="ro">Tipul persoanei</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="10" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="personIdentifier" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="en">Person identifier</xs:documentation>
        <xs:documentation xml:lang="ro">Identificator persoana</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="30" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="repDevCode" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Medical device code</xs:documentation>
        <xs:documentation xml:lang="ro">Cod dispozitiv medical</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="serialNo" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Serial number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar serial</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="40" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="prodCUI" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Producer PID</xs:documentation>
        <xs:documentation xml:lang="ro">CUI producator</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="prodDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Production date</xs:documentation>
        <xs:documentation xml:lang="ro">Data producerii</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="guaranteeExpDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Guarantee Expiration Date</xs:documentation>
        <xs:documentation xml:lang="ro">Data expirarii garantiei</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="invoiceValue" type="xs:decimal" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Invoiced value</xs:documentation>
        <xs:documentation xml:lang="ro">Valoare facturata</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="repReferencePrice" type="xs:decimal" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Reference Price</xs:documentation>
        <xs:documentation xml:lang="ro">Pret referinta</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="receiptNo" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Receipt Number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar chitanta</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="receiptValue" type="xs:decimal" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Receipt Value</xs:documentation>
        <xs:documentation xml:lang="ro">Valoare chitanta</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="receiptDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Receipt date</xs:documentation>
        <xs:documentation xml:lang="ro">Data chitanta</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="repDecisionNo" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Decision number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar decizie</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="repDecisionYear" type="xs:decimal" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Decision year</xs:documentation>
        <xs:documentation xml:lang="ro">An decizie</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="repDecisionDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Decision date</xs:documentation>
        <xs:documentation xml:lang="ro">Data decizie</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="resellerCUI" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Reseller PID</xs:documentation>
        <xs:documentation xml:lang="ro">CUI vanzator</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="grantDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Grant date</xs:documentation>
        <xs:documentation xml:lang="ro">Data acordare</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="orderDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Order date</xs:documentation>
        <xs:documentation xml:lang="ro">Data comanda</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="devType" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Device type</xs:documentation>
        <xs:documentation xml:lang="ro">Tip dispozitiv</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="providerAuthorization" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Provider's authorization</xs:documentation>
        <xs:documentation xml:lang="ro">Autorizatie furnizor </xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="receptionConfirmation" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Reception confirmation</xs:documentation>
        <xs:documentation xml:lang="ro">Confirmare primire</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="efficiencyConfirmation" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Efficiency confirmation</xs:documentation>
        <xs:documentation xml:lang="ro">Confirmare eficienta</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="conformityDeclarationNo" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Conformity Declaration Number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar declaratie de conformitate</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="prothesysType" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Prothesys type</xs:documentation>
        <xs:documentation xml:lang="ro">Tip proteza</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="talonNo" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Talons number</xs:documentation>
        <xs:documentation xml:lang="ro">Numar taloane</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="1" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="guaranteeCert" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">Certification Guarantee</xs:documentation>
        <xs:documentation xml:lang="ro">Certificat Garantie</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="50" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="vatValue" type="xs:decimal" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="en">VAT value</xs:documentation>
        <xs:documentation xml:lang="ro">Valoare TVA</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
</xs:schema>